// mutations: {
//   // 这个state就是store里面的state
//   changeCityName: function(state, city) {
//     console.log(city);
//     state.city = city;
//     // 用localStorage保存, 防止刷新后新的值消失
//     localStorage.city = city;

//   }
// }

function changeCityName(state, city) {
  state.city = city;
  // 用localStorage保存, 防止刷新后新的值消失
  localStorage.city = city;
}

export default {
  changeCityName
}